/**
 * Created by python on 19-3-29.
 */

$('.news li').click(function () {
        // 取到新闻的id
        var new_id = $(this).attr('new_id');


$(function get_news_detail() {

    var parm = {
        "id": new_id
    };
    $.get('"' + "/news/" + new_id + '"', parm, function(resp){
        var data = resp.data;
        if (resp.errno=="200"){
            $(".con").html("");
            var content = '<li>';
            content += '<h3>data.title</h3>';
            content += '<img src="'+ data.image_url +'">';
            content += '<li>data.content</li>';
            content += '</li>';
            $(".con").append(content)
        }
    })
    });
});


